This invention relates to data communication systems, and more particularly, to a method and system for servicing priority data queues in a multiport network switch.
1. Background Art
A multiport switch may be provided in a data communication network to enable data communication between multiple network stations connected to various ports of the switch. Multiple queues of different priorities may be arranged at each port to service receive and transmit data according to data priority.
Weighted Fair Queuing (WFQ) is the most widely used method of servicing priority traffic in packet switching. This method relies on computing the finish times of all packets in all non-empty queues and servicing those packets whose finish times are first. As WFQ requires time stamping each packet, this method is difficult to implement in a network switch, where each packet needs to be time stamped based on its estimated finish time calculated in accordance with a fluid model.
Thus, there is a need for a priority traffic servicing scheme that may be easily implemented in a network switch.
2. Disclosure of the Invention
The invention provides a novel method of servicing multiple data queues having different priorities in a multiport network switch. A dequeuing logic circuit provided at each port of the switch services the data queues in a round-robin fashion to provide the transmission of data packets selected from the data queues. Programmable number of data packets is selected from each data queue in each cycle of the servicing procedure.
In accordance with a first aspect of the invention, the dequeuing logic circuit compares the number of data packets selected from a current data queue in a current cycle of the servicing procedure with the preprogrammed number of data packets set for the current queue, and selects a data packet from the current data queue only if the number of packets selected from the current data queue in the current cycle is less than the preprogrammed number. Selection of a data packet from the current data queue is bypassed in favor of processing a next data queue, if the number of packets selected from the current data queue in the current cycle is not less than the preprogrammed number.
Preferably, the preprogrammed number of data packets is higher for a data queue having a higher priority. The total value of preprogrammed numbers of data packets to be selected in each cycle for all data queues is equal to a preprogrammed total number of data packets to be selected in each cycle. The total number of data packets selected in the current cycle is equal to the preprogrammed total number. The current cycle may be reset if the total number of data packets selected in the current cycle is equal to the preprogrammed total number.
In accordance with another aspect of the invention, counters are provided for counting number of bytes selected from each data queue in a preset time interval. Each data queue is assigned with a threshold value that may correspond to bandwidth allocated to the data queue.
The dequeuing circuit may compare the number of bytes selected from the current data queue in a preset time interval with a threshold value assigned to the current data queue. A data packet from the current data queue is selected only if the number of bytes selected from the current data queue in the preset time interval is less than the threshold value assigned to the current data queue.